<template>
  <span @click="handleClick">
    <slot>{{ props.to }}</slot>
  </span>
</template>

<script lang="ts" setup>
import { defineProps } from "vue";

const props = defineProps({
  to: { type: String, default: "/" },
});

function handleClick() {
  window.location.hash = `#${props.to}`;
}
</script>
<style lang="scss" scoped></style>
